/*
 * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.iec.edp.caf.boot.context;

import io.iec.edp.caf.core.context.CafContextWrapper;
import io.iec.edp.caf.core.session.CafSession;

/**
 * 上下文设置包装类，方便后台线程设置session及语言上下文
 * 已作废，请使用{@link io.iec.edp.caf.core.context.CafContextWrapper} 替换
 *
 * @author wangyandong
 * @date 2020/11/23 19:21
 */
@Deprecated
public class CAFContextWrapper {

    public static CAFContextWrapper current = new CAFContextWrapper();

    protected CAFContextWrapper() {
    }

    /**
     * 根据Session设置Session及语言上下文
     */
    public void setCurrentContext(CafSession session) {
        CafContextWrapper.current.setCurrentContext(session);
    }

    /**
     * 根据当前语言设置语言上下文
     */
    public void setCurrentLanguage(String language) {
        CafContextWrapper.current.setCurrentLanguage(language);
    }

}
